<template>
<van-tabbar v-model="active">
  <van-tabbar-item replace to="/" icon="fire">电影</van-tabbar-item>
  <van-tabbar-item replace to="/cinema" icon="friends">影院</van-tabbar-item>
  <van-tabbar-item replace to="/news" icon="diamond">资讯</van-tabbar-item>
  <van-tabbar-item replace to="/center" icon="manager" badge="2">我的</van-tabbar-item>
</van-tabbar>
</template>
<script setup lang="ts">
import { ref } from "vue";
//根据路由状态动态设置active值
const active=ref<number>(0);
</script>